home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Loadstar 26
/
026.d81
/
t.r_s restore
< prev
next >
Wrap
Text File
|
2022-08-26
|
2KB
|
109 lines
DEFINING the RUN/STOP and RESTORE KEYS
by
John Kottler
COMMODORE MICROCOMPUTERS MAGAZINE
July/August, 1986
p. 96
**************************************
NOTE: Because of the nature of this
program, it cannot be run from the
Loadstar operating system. To run
this program, exit Loadstar and type:
LOAD"R/S RESTORE",8 [RETURN]
RUN [RETURN]
**************************************
A good feature to have in many
kinds of programs is a "pause"
feature-- one that allows the user to
stop the program by pressing the
RUN/STOP key and then continue by
pressing RUN/STOP a second time.
As you might expect, this is easier
said than done-- after all, how can
the computer test to see if the
RUN/STOP key has been activated when
that key automatically stops the
program? The first step is to disable
the RUN/STOP key using POKE 808,234.
With the STOP key disabled, we can
check for someone pressing it with:
IF PEEK(197)=63 THEN (PAUSE).
John Kottler's "Program 1"
does the necessary programming work
for you-- it POKEs a machine language
program disabling the RUN/STOP key and
then automatically runs a second demo
program. When you run the second
program, you will see that pressing
the RUN/STOP key will cause the
program to "pause".
To run "Program 1" with your own
programs you must first delete Line
35. (To delete the line, load
"Program 1", type "35" --no quotes--
and press RETURN.
If you want to learn more about the
ins and outs of adding pause features
to your programs, be sure to check out
Kottler's article in the
MICROCOMPUTERS magazine cited at the
beginning of this article.
DISK FILES USED:
R/S RESTORE
-----------< end of text >------------